package mode

// 前端展示表
import "gorm.io/gorm"

type Db_menu struct {
	gorm.Model
	Name      string `json:"name" form:"name" gorm:"size:10;not null;comment:菜单/按钮唯一标识，由前端路由name,"`
	Api_id    int    `json:"api_id" form:"api_id" gorm:"type:int;allow_null:true;unique;comment:后端确定的api;default:null"`
	Perm      string `json:"perm" form:"perm" gorm:"size:200;not null;unique;comment:以这样形式 monitor:online:forceLogout;default:#"`
	Pattern   int    `json:"pattern" form:"pattern" gorm:"type:int;not null;comment:菜单类型， 1-菜单/目录 2-tabs 3-按钮"`
	Order_Num int    `json:"order_num" form:"order_num" gorm:"type:int;not null"`
	Pid       int    `json:"pid" form:"pid" gorm:"type:int;not null"`
	Level     int    `json:"level" form:"level" gorm:"type:int;not null"`
	Hidden    int8   `json:"hidden" form:"hidden" gorm:"type:int;not null;comment:用于控制菜单按钮显隐;default:0"`
	Path      string `json:"path" form:"path" gorm:"size:200;comment:path时是前端提交后端地址;default:''"`
}
